package com.njtoyo.taxi.admin.mapper.master.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.njtoyo.taxi.admin.library.common.GeoPoint;
import com.njtoyo.taxi.admin.mapper.master.enums.AppointmentCallState;
import com.njtoyo.taxi.admin.mapper.master.enums.RealtimeCallCategory;
import com.njtoyo.taxi.admin.mapper.master.enums.RidePlatform;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Dell
 * @since 2021-08-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "RealtimeCall对象", description = "")
public class RealtimeCall implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "乘客ID")
    private Long customerId;

    @ApiModelProperty(value = "司机ID")
    private Long driverId;

    @ApiModelProperty(value = "出发地坐标")
    private GeoPoint origin;

    @ApiModelProperty(value = "出发地名称")
    private String originName;

    @ApiModelProperty(value = "起点详细路名")
    private String originPlaceName;

    @ApiModelProperty(value = "目的地坐标")
    private GeoPoint destination;

    @ApiModelProperty(value = "目的地名称")
    private String destinationName;

    @ApiModelProperty(value = "目的地详细路名")
    private String destinationPlaceName;

    @ApiModelProperty(value = "地区ID")
    private Long areaId;

    @ApiModelProperty(value = "后台运营ID")
    private Long cantonId;

    @ApiModelProperty(value = "实时单类型：0:realtime[正常实时单],1:assign[派单实时单]")
    private RealtimeCallCategory category;

    @ApiModelProperty(value = "状态0:waiting;1:pick;2:cancelled;3:covered")
    private AppointmentCallState state;

    @ApiModelProperty(value = "加价")
    private Integer priceMarkup;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    @ApiModelProperty(value = "路程")
    private Integer distance;

    @ApiModelProperty(value = "接驾时间")
    private Date pickUpTime;

    @ApiModelProperty(value = "0:wxmina(微信小程序),1:app(APP),2:h5(h5网页),3:webkit(全澄通),4:h5Market(h5本地生活)")
    private RidePlatform platform;

    @ApiModelProperty(value = "行程表ID")
    private Long refId;

    @ApiModelProperty(value = "预估距离")
    private BigDecimal estimateDistance;

    @ApiModelProperty(value = "预估金额")
    private BigDecimal estimatePrice;

    private Boolean needPrepay;

    private Long callType;

}
